﻿using System.Collections.Generic;
using Citi.RoutineBase;
using System;

namespace Citi.PTSConsolidation.SchedulerUI.Bases
{
    public abstract class CurrentYear : IExecutableRoutine
    {
        public IEnumerable<RoutineParameter> Parameters { get { return null; } }

        protected abstract void ExecuteProcess(DateTime referenceDate, ref ICurrentAction currentAction, string networkUser, string networkPassword, Dictionary<string, object> parameters);

        public void Rollback(ref ICurrentAction currentAction, Dictionary<string, object> parameters)
        {

        }

        public void Stop(ref ICurrentAction currentAction, Dictionary<string, object> parameters)
        {

        }

        public void Start(DateTime scheduledDate, ref ICurrentAction currentAction, Dictionary<string, object> parameters)
        {
            var robotUsername = parameters["RobotUsername"].ToString();
            var robotPassword = parameters["RobotPassword"].ToString();

            ExecuteProcess(scheduledDate, ref currentAction, robotUsername, robotPassword, parameters);
        }
    }
}
